/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.bear.fe.conn2;

/**
 *
 * @author libear
 */
public class ID {
    public long startTime = System.currentTimeMillis();
    public long threadId ;
    public ID(){
        threadId = Thread.currentThread().getId();
    }

    public long getStartTime() {
        return startTime;
    }

    public void setStartTime(long startTime) {
        this.startTime = startTime;
    }
    public boolean equals(Object o){
        ID other = (ID)o;
        if(o==null)return false;
        if(other.startTime==this.startTime&&other.threadId==this.threadId){
            return true;
        }
        return false;
    }

    @Override
    public int hashCode() {
        return super.hashCode();
    }

    @Override
    public String toString() {
        return startTime+"_"+threadId;
    }
}
